<%@ taglib prefix="s" uri="/struts-tags" %>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Consulta de Veiculos</title>
<LINK href="../style.css" rel="stylesheet" type="text/css">
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAh-4-WXT7vryB4zWcSDKIThSuBLcACnbYAIBxS9eHfruCpUv1BBRZi-GSNoVlnTofbgShokT-TgG8BA" type="text/javascript"></script>
<script type="text/javascript">
function initialize() {
	
	var query = window.location.search.substring(1);
	
	var vars = query.split("&");
	var parteLat;
	var parteLong;
	//alert(vars[1]);
	for (var i=0;i<vars.length;i++)
	{
		if (i==0)
		{
			parteLat=vars[i].split("=");
		}else 
			parteLong=vars[i].split("=");
		
		
	}

	//var cod = getQuery("cod")
	
    if (GBrowserIsCompatible()) {
      var map = new GMap2(document.getElementById("map_canvas"));
      map.setCenter(new GLatLng(parteLat[1], parteLong[1]), 16);
      
      var latlng = new GLatLng(parseFloat(parteLat[1]),
                                  parseFloat(parteLong[1]));
          map.addOverlay(new GMarker(latlng));
    }
  }
  
  </script>
 
</head>
<body onload="initialize()" onunload="GUnload()">
	<%@ include file="../pages/template/header.jsp" %>
	<div id="content">
		<h1>Consulta de Veiculos</h1>
		
    	<div id="map_canvas" style="width: 800px; height: 600px; background-color: rgb(229, 227, 223); left: 50%; position:absolute; margin-left: -400px;">
    		
		</div>
	</div>	
	<%@ include file="../pages/template/footer.jsp" %>
</body>
</html>